<?php

// +----------------------------------------------------------------------

// | ThinkPHP [ WE CAN DO IT JUST THINK ]

// +----------------------------------------------------------------------

// | Copyright (c) 2006~2018 http://thinkphp.cn All rights reserved.

// +----------------------------------------------------------------------

// | Licensed ( http://www.apache.org/licenses/LICENSE-2.0 )

// +----------------------------------------------------------------------

// | Author: liu21st <liu21st@gmail.com>

// +----------------------------------------------------------------------

use think\facade\Route;



//小程序

Route::group(function (){

    //不需要验证登录

    Route::group(function (){

        Route::rule('miniapp/init','miniapp.Main/init');

        Route::rule('miniapp/passport','miniapp.Main/passport');

        Route::rule('miniapp/showShopDetail','miniapp.Main/showShopDetail');

        Route::rule('miniapp/getHomeData','miniapp.Main/getHomeData');//首页数据

        Route::rule('miniapp/getRecommendMiniapps','miniapp.Main/getRecommendMiniapps');//小程序推荐

        Route::rule('miniapp/getCouponDatas','miniapp.member.Coupon/getCouponDatas');//获取优惠券

        Route::rule('miniapp/getGoodsCategory','miniapp.member.goods.Goods/getGoodsCategory');//获取商品分类

        Route::rule('miniapp/getGoodsList','miniapp.member.goods.Goods/getGoodsList');//获取商品

        Route::rule('miniapp/getAllGoodsList','miniapp.member.goods.Goods/getAllGoodsList');//获取商品

        Route::rule('miniapp/getGoodsDetail','miniapp.member.goods.Goods/getGoodsDetail'); //商品详情

        Route::rule('miniapp/getGoodsListByGoodsIds','miniapp.member.goods.Goods/getGoodsListByGoodsIds'); //获取一组商品及SKU

        Route::rule('miniapp/getLookList','miniapp.member.Look/getLookList');//发现列表

        

        //获取运费模版

        Route::rule('miniapp/getFreightTemplate','miniapp.member.goods.Order/getFreightTemplate');

        

        //预售

        Route::rule('miniapp/getPreSaleGoodsList','miniapp.member.goods.PreSale/getPreSaleGoodsList');//获取预售商品

        Route::rule('miniapp/getPreSaleGoodsDetail','miniapp.member.goods.PreSale/getPreSaleGoodsDetail');//获取预售商品详情



        //秒杀

        Route::rule('miniapp/getFlashSaleGoodsList','miniapp.member.goods.FlashSale/getFlashSaleGoodsList');//获取秒杀商品

        Route::rule('miniapp/getFlashSaleGoodsDetail','miniapp.member.goods.FlashSale/getFlashSaleGoodsDetail');//获取秒商品详情



        //拼团

        Route::rule('miniapp/getPinTuanGoodsList','miniapp.member.goods.PinTuan/getPinTuanGoodsList');//获取拼团商品

        Route::rule('miniapp/getPinTuanGoodsDetail','miniapp.member.goods.PinTuan/getPinTuanGoodsDetail');//获取拼团商品详情

        Route::rule('miniapp/getGroupList','miniapp.member.goods.PinTuan/getGroupList');//获取拼团商品的拼团列表

        Route::rule('miniapp/showPinTuanDetail','miniapp.member.goods.PinTuan/showPinTuanDetail');//获取邀请拼团详情





        //囤货

        Route::rule('miniapp/getStoreGoodsList','miniapp.member.goods.Store/getStoreGoodsList');//获取囤货商品

        Route::rule('miniapp/getStoreGoodsDetail','miniapp.member.goods.Store/getStoreGoodsDetail');//获取囤货商品详情



        //抢购

        Route::rule('miniapp/getProjectTypeList','miniapp.member.project.Snapup/getProjectTypeList');//获取项目分类列表

        Route::rule('miniapp/getSnapupList','miniapp.member.project.Snapup/getSnapupList');//获取抢购列表

        Route::rule('miniapp/getSnapupDetail','miniapp.member.project.Snapup/getSnapupDetail');//获取抢购详情

        //次卡

        Route::rule('miniapp/getOncecardList','miniapp.member.project.Oncecard/getOncecardList');//获取抢购列表

        Route::rule('miniapp/getOncecardDetail','miniapp.member.project.Oncecard/getOncecardDetail');//获取抢购详情



        //预约

        Route::rule('miniapp/showAppointment','miniapp.member.Appointment/showAppointment');//展示预约的服务和技师

        Route::rule('miniapp/getTechnicianDetail','miniapp.member.Appointment/getTechnicianDetail');//展示预约的服务和技师

        Route::rule('miniapp/showAppointmentApply','miniapp.member.Appointment/showAppointmentApply');//展示预约的页面

        Route::rule('miniapp/getAppointmentApplyTime','miniapp.member.Appointment/getAppointmentApplyTime');//展示预约的页面的预约时间



    })->middleware(\app\beautiful\middleware\MiniappCheck::class);



    //订单下单

    Route::group(function (){

        Route::rule('miniapp/getBalancePayment','miniapp.payment/getBalancePayment');//充值调起微信支付        

        Route::rule('miniapp/getBuyPayment','miniapp.payment/getBuyPayment'); //买单调起微信支付

        

        Route::rule('miniapp/getGoodsMallPayment','miniapp.payment/getGoodsMallPayment');//商城订单下支付

        Route::rule('miniapp/getStoreMallPayment','miniapp.payment/getStoreMallPayment');//商城囤货下支付

        

         Route::rule('miniapp/getPintuanMallPayment','miniapp.payment/getPintuanMallPayment');//商城囤货下支付



        Route::rule('miniapp/getOncecardPayment','miniapp.payment/getOncecardPayment'); //次卡调起微信支付

        Route::rule('miniapp/getSnapupPayment','miniapp.payment/getSnapupPayment'); //抢购调起微信支付

    })->middleware([\app\beautiful\middleware\MiniappCheck::class,\app\beautiful\middleware\MemberCheck::class]);

    //订单回调

    Route::group(function (){

        Route::rule('miniapp/balanceRespond/:shop_id','miniapp.payment/balanceRespond');//充值回调

        Route::rule('miniapp/buyRespond/:shop_id','miniapp.payment/buyRespond');//买单支付回调

        

        Route::rule('miniapp/goodsMallRespond/:shop_id','miniapp.payment/goodsMallRespond');//商城订单支付回调

        Route::rule('miniapp/storeMallRespond/:shop_id','miniapp.payment/storeMallRespond');//商城囤货支付回调

        Route::rule('miniapp/pintuanMallRespond/:shop_id','miniapp.payment/pintuanMallRespond');//商城囤货支付回调



        Route::rule('miniapp/oncecardRespond/:shop_id','miniapp.payment/oncecardRespond');//次卡微信支付回调

        Route::rule('miniapp/snapupRespond/:shop_id','miniapp.payment/snapupRespond');//抢购微信支付回调

    })->middleware(\app\beautiful\middleware\MiniappCheck::class);

    

    //需要验证登录（用户）

    Route::group(function (){



        Route::rule('miniapp/getBalancePackage','miniapp.member.Member/getBalancePackage');//获取充值套餐

        

        Route::rule('miniapp/getPaymentOrderRole','miniapp.member.member/getPaymentOrderRole');//下单前获得积分使用规则以及我的账户优惠券

        Route::rule('miniapp/getGoodsOrderMoneyPay','miniapp.member.goods.Order/getGoodsOrderMoneyPay'); //订单的余额支付

        Route::rule('miniapp/getStoreOrderMoneyPay','miniapp.member.goods.store/moneyPay'); //囤货订单余额支付

        

        //我的囤货单列表

        Route::rule('miniapp/getStoreOrderList','miniapp.member.goods.store/getStoreOrderList');

        Route::rule('miniapp/getStoreOrderDetail','miniapp.member.goods.store/getStoreOrderDetail'); //囤货订单详情

        

        //我的订单列表

        Route::rule('miniapp/getGoodsOrderList','miniapp.member.goods.Order/getGoodsOrderList');

        

        Route::rule('miniapp/getBuyInit','miniapp.member.buy/init');//买单的初始化

        Route::rule('miniapp/getBuyCreateOrder','miniapp.member.buy/buyCreateOrder');//下优惠买单订单

        Route::rule('miniapp/getBuyMoneyPayment','miniapp.member.buy/buyMoneyPayment');//余额支付买单

        

        Route::rule('miniapp/getPartnerInfo','miniapp.member.Partner/getPartnerInfo');

        Route::rule('miniapp/getPartnerCustomer','miniapp.member.Partner/getPartnerCustomer');

        Route::rule('miniapp/getPartnerCommission','miniapp.member.Partner/getPartnerCommission');

        Route::rule('miniapp/getPartnerQrCode','miniapp.member.Partner/getPartnerQrCode');

        Route::rule('miniapp/getPartnerWithdraw','miniapp.member.Partner/getPartnerWithdraw');

        Route::rule('miniapp/partnerWithdrawAct','miniapp.member.Partner/partnerWithdrawAct');

        Route::rule('miniapp/getPosterList','miniapp.member.Partner/getPosterList');

        //分享礼包
        Route::rule('miniapp/getPartnerGiftbagList','miniapp.member.Partner/getPartnerGiftbagList');

        Route::rule('miniapp/getMemberInfo','miniapp.member.Member/show');

        Route::rule('miniapp/getMemberRole','miniapp.member.Member/getMemberRole');

        Route::rule('miniapp/getMemberQrcode','miniapp.member.Member/getMemberQrcode');

        Route::rule('miniapp/saveMemberInfo','miniapp.member.Member/saveMemberInfo');


        Route::rule('miniapp/getCoupon','miniapp.member.Coupon/getCoupon');//领取优惠券

        Route::rule('miniapp/getMemberCoupons','miniapp.member.Coupon/getMemberCoupons');//获取我的优惠券


        Route::rule('miniapp/getMemberBalanceLogs','miniapp.member.Member/getMemberBalanceLogs');//余额明细

        Route::rule('miniapp/getGiftbagInfo','miniapp.member.Coupon/getGiftbagInfo');//获取礼包详情

        Route::rule('miniapp/getGiftbagCoupon','miniapp.member.Coupon/getGiftbagCoupon');//一键领取礼包优惠券

        Route::rule('miniapp/getMemberIntegralLogs','miniapp.member.Member/getMemberIntegralLogs');//积分明细

        Route::rule('miniapp/getExchangeCouponDatas','miniapp.member.Coupon/getExchangeCouponDatas');//可兑换的优惠券

        Route::rule('miniapp/exchangeCoupon','miniapp.member.Coupon/exchangeCoupon');//兑换优惠券



        Route::rule('miniapp/getMemberBuyLogs','miniapp.member.Member/getMemberBuyLogs');//买单记录



        Route::rule('miniapp/likesLook','miniapp.member.Look/likesLook');//点赞相册



        //订单        

        Route::rule('miniapp/CreateGoodsOrder','miniapp.member.goods.Goods/createOrder');//商品下单

        Route::rule('miniapp/CreatePreSaleGoodsOrder','miniapp.member.goods.PreSale/createOrder');//预售商品下单

        Route::rule('miniapp/CreateFlashSaleGoodsOrder','miniapp.member.goods.FlashSale/createOrder');//秒杀商品下单





        Route::rule('miniapp/CancelGoodsOrder','miniapp.member.goods.Order/cancelOrder');//取消下单

        Route::rule('miniapp/yesGoodsOrder','miniapp.member.goods.Order/yesOrder');

        Route::rule('miniapp/deleteGoodsOrder','miniapp.member.goods.Order/deleteOrder');

        Route::rule('miniapp/getGoodsOrderDetail','miniapp.member.goods.Order/getGoodsOrderDetail');
        
        
        
        //预约
        Route::rule('miniapp/getSendTime','miniapp.member.goods.Send/getSendTime');//同城预约配送时间
        
        Route::rule('miniapp/getDaySendTime','miniapp.member.goods.Send/getDaySendTime');//同城预约某天配送时间


        //配送

        Route::rule('miniapp/getShopSendInfo','miniapp.member.goods.Order/getShopSendInfo');//获取配送信息

        Route::rule('miniapp/getAddressResult','miniapp.member.goods.Send/getAddressResult');//判断地址是否符合

        Route::rule('miniapp/getFreightInfo','miniapp.member.goods.Send/getFreightInfo');//获取邮费

        Route::rule('miniapp/getSendType','miniapp.member.goods.Send/getSendType');//获取开启的配送方式

        //拼团订单

        Route::rule('miniapp/CreatePinTuanGoodsOrder','miniapp.member.goods.PinTuan/createOrder');//拼团商品下单

        Route::rule('miniapp/CancelPinTuanGoodsOrder','miniapp.member.goods.PinTuan/cancelPay');//取消拼团支付

        Route::rule('miniapp/PinTuanMoneyPay','miniapp.member.goods.PinTuan/moneyPay');//拼团余额支付

        Route::rule('miniapp/CancelPinTuan','miniapp.member.goods.PinTuan/cancelPinTuan');//取消拼团

        Route::rule('miniapp/getMyPintuanOrderList','miniapp.member.goods.PinTuan/getMyPintuanOrderList'); //我的拼团列表

        Route::rule('miniapp/getPinTuanDetail','miniapp.member.goods.PinTuan/getPinTuanDetail');//获取拼团详情



        //囤货订单

        Route::rule('miniapp/CreateStoreGoodsOrder','miniapp.member.goods.Store/createOrder');//囤货商品下单

        Route::rule('miniapp/CancelStoreGoodsOrder','miniapp.member.goods.Store/cancelOrder');//取消囤货商品下单

        Route::rule('miniapp/deleteStoreGoodsOrder','miniapp.member.goods.Store/deleteOrder');//删除囤货订单



        Route::rule('miniapp/createSnapupOrder','miniapp.member.project.Snapup/createOrder');//抢购下单

        Route::rule('miniapp/SnapupMoneyPay','miniapp.member.project.Snapup/moneyPay');//抢购余额支付

        Route::rule('miniapp/cancelSnapupOrder','miniapp.member.project.Snapup/cancelOrder');//取消抢购订单

        Route::rule('miniapp/getMemberSnapupList','miniapp.member.project.Snapup/getMemberSnapupList');//我的抢购

        Route::rule('miniapp/getMemberSnapupDetail','miniapp.member.project.Snapup/getMemberSnapupDetail');//我的抢购



        Route::rule('miniapp/createOncecardOrder','miniapp.member.project.Oncecard/createOrder');//次卡下单

        Route::rule('miniapp/OncecardMoneyPay','miniapp.member.project.Oncecard/moneyPay');//次卡余额支付

        Route::rule('miniapp/cancelOncecardOrder','miniapp.member.project.Oncecard/cancelOrder');//取消次卡订单



        Route::rule('miniapp/getMemberOncecardList','miniapp.member.project.Oncecard/getMemberOncecardList');//我的次卡

        Route::rule('miniapp/getMemberOncecardDetail','miniapp.member.project.Oncecard/getMemberOncecardDetail');//我的次卡详情

        Route::rule('miniapp/getMemberOncecardLogs','miniapp.member.project.Oncecard/getMemberOncecardLogs');//次卡的核销记录



        //预约

        Route::rule('miniapp/saveAppointment','miniapp.member.Appointment/saveAppointment');//预约操作

        Route::rule('miniapp/getMemberAppoinment','miniapp.member.Appointment/getMemberAppoinment');//获取我的预约列表

        Route::rule('miniapp/cancelAppointment','miniapp.member.Appointment/cancelAppointment');//取消预约



        

    })->middleware([\app\beautiful\middleware\MiniappCheck::class,\app\beautiful\middleware\MemberCheck::class]);



    //员工

    Route::group(function (){

        Route::rule('miniapp/staff/getStaffInfo','miniapp.staff.Main/getStaffInfo');//获取员工信息

        Route::rule('miniapp/staff/getSearchMemeberId','miniapp.staff.Main/getSearchMemeberId');//获取员工信息

        Route::rule('miniapp/staff/scanCheckMember','miniapp.staff.Main/scanCheckMember');//扫码确认

        Route::rule('miniapp/staff/applyVip','miniapp.staff.Main/applyVip');//办理会员

//        Route::rule('miniapp/staff/getGoodsCategory','miniapp.staff.Main/getGoodsCategory');//获取商品分类

        Route::rule('miniapp/staff/chooseGoods','miniapp.staff.Main/chooseGoods');//选择商品

        Route::rule('miniapp/staff/getMemberInfoFromMobile','miniapp.staff.Member/getMemberInfoFromMobile');//获取会员信息



        //会员详情

        Route::rule('miniapp/staff/getMemberInfo','miniapp.staff.Member/getMemberInfo');//获取会员信息

        Route::rule('miniapp/staff/balanceRecharge','miniapp.staff.Member/balanceRecharge');//余额充值

        Route::rule('miniapp/staff/writeOffBalance','miniapp.staff.Member/writeOffBalance');//余额核销

        Route::rule('miniapp/staff/integralRecharge','miniapp.staff.Member/integralRecharge');//积分充值

        Route::rule('miniapp/staff/writeOffIntegral','miniapp.staff.Member/writeOffIntegral');//积分核销

        Route::rule('miniapp/staff/chooseCoupon','miniapp.staff.Member/chooseCoupon');//获取可赠送的优惠券

        Route::rule('miniapp/staff/sendCoupon','miniapp.staff.Member/sendCoupon');//赠送优惠券

        Route::rule('miniapp/staff/getMemberCouponList','miniapp.staff.Member/getMemberCouponList');//获取用户优惠券

        Route::rule('miniapp/staff/writeOffCoupon','miniapp.staff.Member/writeOffCoupon');//核销优惠券



        Route::rule('miniapp/staff/getMemberLogsList','miniapp.staff.Member/getMemberLogsList');//会员记录



        //相册管理

        Route::rule('miniapp/staff/getLookList','miniapp.staff.Look/getLookList');//获取相册列表

        Route::rule('miniapp/staff/showLook','miniapp.staff.Look/show');//获取相册详情

        Route::rule('miniapp/staff/getGoodsList','miniapp.staff.Look/getGoodsList');//获取普通商品不含SKU的接口

        Route::rule('miniapp/staff/saveLook','miniapp.staff.Look/save');//保存相册

        Route::rule('miniapp/staff/delLook','miniapp.staff.Look/del');//删除相册

        //

        //订单管理

        Route::rule('miniapp/staff/getGoodsOrderList','miniapp.staff.Order/getGoodsOrderList');//获取订单列表

        Route::rule('miniapp/staff/getGoodsOrderDetail','miniapp.staff.Order/detail');//获取订单详情

        Route::rule('miniapp/staff/cancelOrder','miniapp.staff.Order/cancelOrder');//取消支付

        Route::rule('miniapp/staff/deliverGoodsOrder','miniapp.staff.Order/deliverGoods');//订单发货

        Route::rule('miniapp/staff/writeOffGoodsOrder','miniapp.staff.Order/writeOff');//订单发货

        Route::rule('miniapp/staff/overGoodsOrder','miniapp.staff.Order/overGoods');



        //囤货订单管理

        Route::rule('miniapp/staff/getStoreOrderList','miniapp.staff.StoreOrder/getStoreOrderList');//获取囤货订单列表

        Route::rule('miniapp/staff/getStoreOrderDetail','miniapp.staff.StoreOrder/detail');//获取囤货订单详情

        Route::rule('miniapp/staff/getStoreOrderWriteOffLogs','miniapp.staff.StoreOrder/getWriteOffLogs');//获取囤货订单消耗记录

        Route::rule('miniapp/staff/writeOffStoreOrder','miniapp.staff.StoreOrder/writeOffStoreOrder');//核销囤货订单

        Route::rule('miniapp/staff/cancelStoreOrder','miniapp.staff.StoreOrder/cancelOrder');//取消支付



        Route::rule('miniapp/staff/writeOffSnapup','miniapp.staff.Member/writeOffSnapup');//核销抢购

        Route::rule('miniapp/staff/getMemberSnapupList','miniapp.staff.Member/getMemberSnapupList');//获取我的抢购列表



        Route::rule('miniapp/staff/chooseOnceCard','miniapp.staff.Member/chooseOnceCard');//获取可以办理次卡列表

        Route::rule('miniapp/staff/applyOnceCard','miniapp.staff.Member/applyOnceCard');//办理次卡

        Route::rule('miniapp/staff/getMemberOncecardList','miniapp.staff.Member/getMemberOncecardList');//获取我的次卡列表

        Route::rule('miniapp/staff/writeOffOncecard','miniapp.staff.Member/writeOffOncecard');//核销次卡



        //线下补单

        Route::rule('miniapp/staff/saveSupplement','miniapp.staff.Supplement/save');//线下补单



        //代客下单

        Route::rule('miniapp/staff/getGoodsFakeList','miniapp.staff.FakeOrder/getGoodsFakeList');//获取产品列表

        Route::rule('miniapp/staff/getStoreGoodsFakeList','miniapp.staff.FakeOrder/getStoreGoodsFakeList');//获取产品列表

        

        Route::rule('miniapp/staff/createFakeOrder','miniapp.staff.FakeOrder/createFakeOrder');//生成订单



        //预约管理

        Route::rule('miniapp/staff/getStaffAppointmentList','miniapp.staff.appointment.StaffAppointment/getStaffAppointmentList');//获取预约列表

        Route::rule('miniapp/staff/staffCancelAppointment','miniapp.staff.appointment.StaffAppointment/staffCancelAppointment');//确认预约

        Route::rule('miniapp/staff/staffSureAppointment','miniapp.staff.appointment.StaffAppointment/staffSureAppointment');//确认预约

        Route::rule('miniapp/staff/staffArrivalAppointment','miniapp.staff.appointment.StaffAppointment/staffArrivalAppointment');//确认已到店

        Route::rule('miniapp/staff/staffGetApplyAppointmentData','miniapp.staff.appointment.StaffAppointment/GetApplyAppointmentData');//获取新增预约的数据

        Route::rule('miniapp/staff/staffAddAppointment','miniapp.staff.appointment.StaffAppointment/addAppointment');//新增预约



        //我的预约（技师）

        Route::rule('miniapp/staff/getTechnicianAppointmentList','miniapp.staff.appointment.TechnicianAppointment/getTechnicianAppointmentList');//获取预约列表

        Route::rule('miniapp/staff/technicianCancelAppointment','miniapp.staff.appointment.TechnicianAppointment/technicianCancelAppointment');//确认预约

        Route::rule('miniapp/staff/technicianSureAppointment','miniapp.staff.appointment.TechnicianAppointment/technicianSureAppointment');//确认预约

        Route::rule('miniapp/staff/technicianArrivalAppointment','miniapp.staff.appointment.TechnicianAppointment/technicianArrivalAppointment');//确认已到店

        Route::rule('miniapp/staff/technicianGetApplyAppointmentData','miniapp.staff.appointment.TechnicianAppointment/getApplyAppointmentData');//获取新增预约的数据

        Route::rule('miniapp/staff/technicianAddAppointment','miniapp.staff.appointment.TechnicianAppointment/addAppointment');//新增预约





        //我的排班（技师）

        Route::rule('miniapp/staff/getTechnicianSchedulingList','miniapp.staff.appointment.TechnicianScheduling/getTechnicianSchedulingList');//获取排班列表

        Route::rule('miniapp/staff/chooseProjectFromScheduling','miniapp.staff.appointment.TechnicianScheduling/chooseProject');//获取可排班的项目

        Route::rule('miniapp/staff/addTechnicianScheduling','miniapp.staff.appointment.TechnicianScheduling/addTechnicianScheduling');//添加排班

        Route::rule('miniapp/staff/delTechnicianScheduling','miniapp.staff.appointment.TechnicianScheduling/delTechnicianScheduling');//删除排班



        //业绩填单

        Route::rule('miniapp/staff/getPerformanceList','miniapp.staff.appointment.Performance/getPerformanceList');//获取排班列表

        Route::rule('miniapp/staff/getPerformanceTypeList','miniapp.staff.appointment.Performance/getPerformanceTypeList');//获取排班列表

        Route::rule('miniapp/staff/addPerformance','miniapp.staff.appointment.Performance/addPerformance');//获取排班列表



        //我的业绩

        Route::rule('miniapp/staff/getAchievementList','miniapp.staff.appointment.Achievement/getAchievementList');//获取我的业绩



        //核销
        Route::rule('miniapp/staff/getSetMealWriteOff','miniapp.staff.writeoff.WriteOff/getSetMealWriteOff');

        Route::rule('miniapp/staff/setMealWriteOff','miniapp.staff.writeoff.WriteOff/setMealWriteOff');

    })->middleware([\app\beautiful\middleware\MiniappCheck::class,\app\beautiful\middleware\MemberCheck::class,\app\beautiful\middleware\StaffCheck::class]);


})->middleware(\app\beautiful\middleware\Base::class);
